//
//  DetectionModel.m
//  INMOTION
//
//  Created by 孙凯旋 on 14-7-11.
//  Copyright (c) 2014年 Inmotion. All rights reserved.
//

#import "DetectionModel.h"
#import "CarModel.h"
#import "IMTConfig.h"
#import "KSLanguageManager.h"

@implementation DetectionModel

- (id)init {
    self = [super init];
    if (self) {
        [self setToDefault];
    }
    return self;
}

- (void)setToDefault {
    self.errorCode = 0;
    self.errorCategories = [[NSMutableArray alloc] init];
    self.errorMessage = IMTNewCarLocalizedString(@"prompt_diagnose_ok");
}

/// 错误分类 --- cell上错误名称
- (NSMutableArray *)loadErrorNameItemWithCarType:(NSString *)carType {
    NSMutableArray *items = nil;
    if (IMTCarSeriesLorin(carType)) { // 主板、电机、电池、仪表、把手
        items = @[
                  IMTNewCarLocalizedString(@"activity_diagnose_motor_driver_board"),
                  IMTNewCarLocalizedString(@"activity_diagnose_motor"),
                  IMTNewCarLocalizedString(@"activity_diagnose_battery"),
                  IMTNewCarLocalizedString(@"activity_diagnose_display"),
                  IMTNewCarLocalizedString(@"activity_diagnose_handle")
                  ].mutableCopy;
    }
    return items;
}

/// 错误分类 --- cell上错误图片
- (NSMutableArray *)loadErrorImageItemWithCarType:(NSString *)carType {
    NSMutableArray *items = nil;
    if (IMTCarSeriesLorin(carType)) {
        items = @[ // 主板，电机，电池，仪表，把手
                  @"FaultDetection5",
                  @"FaultDetection9",
                  @"FaultDetection7",
                  @"FaultDetection1",
                  @"FaultDetection2"
                  ].mutableCopy;
    }
    return items;
}

@end
